﻿using System.Collections.ObjectModel;
using 小玩意.Model;

namespace 小玩意
{
    public static class InitDevice
    {

        public static ObservableCollection<S7Model> GetPlcDevice()
        {
            ObservableCollection<S7Model> S7mode;
            //TODO:后续补充读取数据库或者配置文件代码
            if (true)
            {
                S7mode = new ObservableCollection<S7Model>()
               {
                new S7Model() { S7Address = "192.168.0.11", S7Lock = 0,S7Slot = 1 },
                 new S7Model() { S7Address = "192.168.0.12", S7Lock = 0,S7Slot = 1 },
                  new S7Model() { S7Address = "192.168.0.13", S7Lock = 0,S7Slot = 1 },
                   new S7Model() { S7Address = "192.168.0.14", S7Lock = 0,S7Slot = 1 },
                    new S7Model() { S7Address = "192.168.0.15", S7Lock = 0,S7Slot = 1 },
                      new S7Model() { S7Address = "192.168.0.16", S7Lock = 0,S7Slot = 1 }
               };
            }
            return S7mode;
        }

        public static ObservableCollection<TcpModel> GetTcpDevice() 
        {

            ObservableCollection<TcpModel> tcpModels;
            //TODO:后续补充读取数据库或者配置文件代码
            if (true)
            {
                S7mode = new ObservableCollection<TcpModel>()
               {
                new S7Model() { S7Address = "192.168.0.11", S7Lock = 0,S7Slot = 1 },
                 new S7Model() { S7Address = "192.168.0.12", S7Lock = 0,S7Slot = 1 },
                  new S7Model() { S7Address = "192.168.0.13", S7Lock = 0,S7Slot = 1 },
                   new S7Model() { S7Address = "192.168.0.14", S7Lock = 0,S7Slot = 1 },
                    new S7Model() { S7Address = "192.168.0.15", S7Lock = 0,S7Slot = 1 },
                      new S7Model() { S7Address = "192.168.0.16", S7Lock = 0,S7Slot = 1 }
               };
            }
            return S7mode;
        }

    }
}
